<%@ page language="java" pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
	<link rel="stylesheet" type="text/css" href="css/base.css" />
	<base href="<%=basePath%>">

	<title>Editar Habitacion</title>
	
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

</head>
  
<body>
	<f:view>
		<h:form>
			<h:panelGrid border="0" columns="3">
				<h:outputText value="Numero"></h:outputText>
				<h:inputText id="numero" value="#{administrarHabitacionesBean.dataItem.numero}" required="true" maxlength="20" size="20" />
				<h:message for="numero" errorClass="error"></h:message>

				<h:outputText value="Piso"></h:outputText>
				<h:inputText id="piso" value="#{administrarHabitacionesBean.dataItem.piso}" required="true" maxlength="20" size="20" />
				<h:message for="piso" errorClass="error"></h:message>
				
				<h:outputText value="Capacidad"></h:outputText>
				<h:inputText id="capacidad" value="#{administrarHabitacionesBean.dataItem.capacidad}" required="true" maxlength="20" size="20" />
				<h:message for="capacidad" errorClass="error"></h:message>

				<h:outputText value="Ocupantes"></h:outputText>
				<h:inputText id="ocupantes" value="#{administrarHabitacionesBean.dataItem.ocupantes}" required="true" maxlength="20" size="20" />
				<h:message for="ocupantes" errorClass="error"></h:message>
				
				<h:outputText value="Ocupada"></h:outputText>
				<h:selectBooleanCheckbox id="ocupada" value="#{administrarHabitacionesBean.dataItem.ocupada}"></h:selectBooleanCheckbox> 
				<h:message for="ocupada" errorClass="error"></h:message>

				<h:outputText value="Precio Basico"></h:outputText>
				<h:inputText id="precioBasico" value="#{administrarHabitacionesBean.dataItem.precioBasico}" required="true" maxlength="20" size="20" />
				<h:message for="precioBasico" errorClass="error"></h:message>
				
			</h:panelGrid>
			<p>
			<h:commandButton value="Guardar" action="#{administrarHabitacionesBean.guardar}"/>
			<h:commandButton value="Cancelar" action="#{administrarHabitacionesBean.volver}" immediate="true" />
		</h:form>
	</f:view>
</body>
</html>